<template>
  <div>
    <div>
      <mt-header title="支付页面" style="background: linear-gradient(#000000, #035838);">
        <mt-button icon="back" slot="left" @click="goBack()">返回</mt-button>
      </mt-header>
    </div>
    <iframe class="iframe" v-bind:src='this.localhost+this.symbol+this.ddbh'>
      <div class="body" id="pay">

      </div>
    </iframe>
  </div>
</template>
<script>
import axios from "axios";
export default {
  data() {
    return {
      ddbh: this.$route.query.ddbh,
      localhost: "",
      symbol: "?ddbh="
    };
  },
  created() {
    // 该方法用来更改tabbarshow的值 用来 展示、隐藏底部 tabbar (boolean为0 展示、boolean为1 隐藏)
    this.$store.dispatch("showTabbar", { boolean: "1" });
  },
  mounted() {
    //this.getPayInfo();
    this.gethost();
  },
  methods: {
    goBack() {
      history.go(-2);
    },
    gethost() {
      let domain = window.location.host;
      this.localhost = "http://" + domain + "/#/paychlid";
    },
    getPayInfo() {
      axios({
        method: "post",
        url: "/api/pc/o/return.htm",
        params: {
          zfbh: this.ddbh,
          method: 1
        }
      }).then(res => {
        console.log(res.data);
        $("#pay").html(res.data);
      });
    }
  }
};
</script>
<style scoped>
.child-view {
  height: 100%;
  overflow: hidden;
}
.body {
}
.iframe {
  width: 100%;
  height: calc(100% - 45px);
}
</style>
